#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTcpSocket>
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

#define GETBYTE(v,n) ((v&(1<<n))>>n)

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = 0);
    ~Widget();

private slots:
    void on_m_btnce_clicked();
    void on_m_btnSend_clicked();
    void slot_ReadData();
    void slot_socketConnected();
    void slot_socketDisconnected();
    void slot_socketError(QAbstractSocket::SocketError);
    void slot_InterpretingData(QByteArray &readdata);
private:
    Ui::Widget *ui;
     QTcpSocket* m_socket;
};
#endif // WIDGET_H
